// 该文件专门用于创建整个应用的路由器
import { createRouter, createWebHashHistory } from 'vue-router'

import Learn from '../pages/Learn.vue'
// import FrontPage from '../pages/FrontPage.vue'

//创建并暴露一个路由器
const routes = [
	{
		name:'home',
		path:'/',
		component: () => import('../pages/FrontPage.vue')
	},
	{
		path:'/home',
		component: () => import('../pages/FrontPage.vue')
	},
	{
		name:'learn',
		path:'/learn',
		component: () => import('../pages/Learn.vue')
	},
  ]

const router = createRouter({
	history: createWebHashHistory(),
	routes
})

export default router